Skip to content

chore: Add a DA service unit test #3423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 35 commits into
base: develop-2.0.0
Choose a base branch
from
Open

Conversation

EmandM
Copy link
Collaborator

@EmandM EmandM commented Apr 24, 2025

MTT-11550

Changelog

  • Added: A unit test against the da service

Testing and Documentation

  • Includes unit tests.

Backport

No backport applicable - DA only

@EmandM EmandM requested review from NoelStephensUnity and a team as code owners April 24, 2025 16:10
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only 1 or 2 questions and a minor suggestion on wording for API documentation.
Otherwise, very nice job:

  • Cleaning up various areas within the NetcodeIntegrationTest.
    • Improved the "readability" in many places.
    • Added a more standard way to obtain various NetworkManager instances.
  • Cleaning up various integration tests
    • Improved the "readability" in many places.
    • Created a more uniform standard "flow" and naming.
  • Adding UseCMBService to tests that still needed conversion along with comments.
  • Removing m_EnableVerboseDebug to reduce over-all test runner log size.

🥇 💯

EmandM and others added 2 commits April 30, 2025 14:57
This is an attempt to fix an issue where Mac OSX is frequently failing the InterpolationStopAndStartMotionTest. Based on the error, I am thinking (hard to tell since it doesn't replicate locally in-editor nor stand alone) that it could be due to a Mac VM running slower than expected (randomly) which could cause the network tick event to trigger more than once in a single frame.
Copy link
Collaborator

@michalChrobot michalChrobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done!

- cd ./mps-common-multiplayer-backend/runtime && $HOME/.cargo/bin/cargo build --example ngo_echo_server
# Run the echo server in the background - this will reuse the artifacts from the build
- cd ./mps-common-multiplayer-backend/runtime && $HOME/.cargo/bin/cargo run --example ngo_echo_server -- --port $ECHO_SERVER_PORT &
- ./Tools/CI/run_cmb_service.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice separation 👌

# Set this to ensure the DA codec tests will fail if they cannot connect to the echo-server
# The default is to ignore the codec tests if the echo-server fails to connect
ENSURE_CODEC_TESTS: "true"
USE_CMB_SERVICE: "true"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where we are using it 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's inside the UseCMBService() function inside NetcodeIntegrationTest.cs (here)

@@ -81,21 +81,17 @@ desktop_standalone_test_{{ project.name }}_{{ platform.name }}_{{ backend }}_{{
{% if platform.name != "win" %} # Issues with win and mac are tracked in MTT-11606
variables:
ECHO_SERVER_PORT: "7788"
CMB_SERVICE_PORT: "7799"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could maybe add a quick comment to those 2 lines to just point where it's used/why we need 2 ports

@@ -0,0 +1,19 @@
# clone the latest rust repo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that actually we could include a short "overall description" of this script (similarly as in other CI files) to describe for example

  • Why we need this script (DA testing)
  • Is there anything specific reader should know (example: won't work on windows)
  • Is is a solution for DA only or it functions more as "distributed testing" so it could be potentially extended to different areas
  • Where we can find usage of this script (desktop-standalone-tests)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Added a bunch of info at the top of the file. I hope it makes things clearer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants